<template>
  <div class="home">
    <Monitor></Monitor>
    <Sales></Sales>
    <Search></Search>
  </div>
</template>

<script lang="ts">
export default {
  name: 'Home'
};
</script>
<script lang="ts" setup>
import { useUserInfoStore } from '@/stores/userInfo';
import { useReportDataStore } from '@/stores/reportData';
import Monitor from './monitor/index.vue';
import Sales from './sales/index.vue';
import Search from './search/index.vue';
import { onMounted } from 'vue';

const userInfoStore = useUserInfoStore();
const reportDataStore = useReportDataStore();

// 1. 页面挂载完毕 直接发送请求
onMounted(() => {
  reportDataStore.getReportData();
});
</script>

<style scoped>
.home {
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #eee;
}
</style>
